/*
 * MySQL Cluster SNMP monitoring subagent
 * Copyright (C) 2011, Steven Ayre <steveayre@gmail.com>
 *
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is MySQL Cluster SNMP monitoring subagent
 *
 * The Initial Developer of the Original Code is
 * Steven Ayre <steveayre@gmail.com>
 * Portions created by the Initial Developer are Copyright (C)
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Steven Ayre <steveayre@gmail.com>
 *
 * subagent.h -- SNMP subagent thread header
 *
 */

#ifndef __SUBAGENT_H__
#define __SUBAGENT_H__

#include "thread.h"

int snmp_subagent_main(thread_t *thread, void *param);

/* .1.3.6.1.4.1 */
#define OID_IANA_ENTERPRISE 37925

/* .1.3.6.1.4.1.37925 */
#define OID_STATUS 1

/* .1.3.6.1.4.1.37925.1 */
#define OID_CLUSTER_TABLE       1
#define OID_MGMT_NODE_TABLE	2
#define OID_DATA_NODE_TABLE	3
#define OID_API_NODE_TABLE	4

/* .1.3.6.1.4.1.37925.1.1 */
#define OID_CLUSTER_INDEX		1
#define OID_CLUSTER_NAME		2
#define OID_CLUSTER_CONNECTSTRING	3
#define OID_CLUSTER_STATUS		4
#define OID_CLUSTER_MIN OID_CLUSTER_INDEX
#define OID_CLUSTER_MAX OID_CLUSTER_STATUS

/* .1.3.6.1.4.1.37925.1.2 */
#define OID_MGMT_NODE_CLUSTER_INDEX	1
#define OID_MGMT_NODE_INDEX		2
#define OID_MGMT_NODE_ID       		3
#define OID_MGMT_NODE_INETADDRESSTYPE	4
#define OID_MGMT_NODE_INETADDRESS	5
#define OID_MGMT_NODE_VERSION		6
#define OID_MGMT_NODE_MIN OID_MGMT_NODE_CLUSTER_INDEX
#define OID_MGMT_NODE_MAX OID_MGMT_NODE_VERSION

/* .1.3.6.1.4.1.37925.1.3 */
#define OID_DATA_NODE_CLUSTER_INDEX	1
#define OID_DATA_NODE_INDEX		2
#define OID_DATA_NODE_ID       		3
#define OID_DATA_NODE_INETADDRESSTYPE	4
#define OID_DATA_NODE_INETADDRESS	5
#define OID_DATA_NODE_VERSION		6
#define OID_DATA_NODE_NODEGROUP		7
#define OID_DATA_NODE_MIN OID_DATA_NODE_CLUSTER_INDEX
#define OID_DATA_NODE_MAX OID_DATA_NODE_VERSION

/* .1.3.6.1.4.1.37925.1.4 */
#define OID_API_NODE_CLUSTER_INDEX	1
#define OID_API_NODE_INDEX		2
#define OID_API_NODE_ID       		3
#define OID_API_NODE_INETADDRESSTYPE	4
#define OID_API_NODE_INETADDRESS	5
#define OID_API_NODE_VERSION		6
#define OID_API_NODE_MIN OID_API_NODE_CLUSTER_INDEX
#define OID_API_NODE_MAX OID_API_NODE_VERSION

/* Why aren't these in net-snmp-includes.h ? */
#define INETADDRESSTYPE_UNKNOWN         0
#define INETADDRESSTYPE_IPV4            1
#define INETADDRESSTYPE_IPV6            2
#define INETADDRESSTYPE_IPV4Z           3
#define INETADDRESSTYPE_IPV6Z           4
#define INETADDRESSTYPE_DNS             16

#endif

